#include <cstdio>
#include <iostream>
#include <algorithm>
#include <cmath>
#include <cstring>
using namespace std;
long long  gcd(long long x,long long  y)
{
	if(y==0) return x;
	else gcd(y,x%y);
}
int main()
{
	long long  n;
	while(scanf("%lld",&n)!=EOF)
	{
		long long x = sqrt(n);
		//if(x*x==n) x-= 1;
		for(long long i = x;i*i>=1;i--)
		{
			if(n%i==0&&gcd(i,n/i)==1)
			{
				printf("%lld %lld\n",i,n/i);
				break;
			}
		}
	}
}
